import React, { Suspense } from "react";
// import {
//   Container
// } from "reactstrap";
//Import Breadcrumb
// import Breadcrumbs from "../../components/Common/Breadcrumb";

//i18n
const Dashboard = props => {

  //meta title
  document.title = "Dashboard | Skote - React Admin & Dashboard Template";

  return (
    <React.Fragment>
      <div className="page-content" style={{marginTop: "60px"}}>
      <Suspense fallback={<Spining />}>
        <MyComponent />
      </Suspense>
      </div>
    </React.Fragment>
  );
};


function Spining() {
  return <p>loading...</p>;
}

let data = null;

function MyComponent() {
  if (!data) {
    throw new Promise((resolve) => {
      setTimeout(() => {
        data = 'kunkun';
        resolve(true);
      }, 10000);
    });
  }
  return (
    <p>
      My Component, data is {data}
    </p>
  );
}


export default Dashboard;
